package dao;

import java.io.InputStream;

public class Conexao {

	private static Conexao conexao;
	private static  int i;

	private Conexao() {

	}

	public synchronized static Conexao getInstance() {

		if (conexao == null){
			conexao = new Conexao();
			i = 0;
		}
		i++;

		return conexao;

	}
	
	public int numeroInstancas() {
		return i;
	}
	
	public InputStream recuperarArquivo(){
		return getClass().getResourceAsStream("/resource/db.txt");
	}
}
